import React, {Component} from "react";
import './App.css';
import {Route, Switch, Redirect, withRouter} from 'react-router-dom'
import IndexPage from "./index/IndexPage";
import LoginPage from "./login/LoginPage";
import zhCN from 'antd/lib/locale/zh_CN';
import {ConfigProvider} from "antd";


class App extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <ConfigProvider locale={zhCN}>
                <Switch>
                    <Redirect exact from="/" to="/index"/>
                    <Route path="/index" component={IndexPage}/>
                    <Route path="/login" component={LoginPage}/>
                </Switch>
            </ConfigProvider>
        );
    }
}

export default withRouter(App);
